﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Controller;
using CrystalDecisions.CrystalReports.Engine;
using System.IO;

namespace IAI.RP
{
    /// <summary>
    /// Interaction logic for PrintPreview.xaml
    /// </summary>
    public partial class PrintPreview : Window
    {
        private MyController _mycontroller;

        public PrintPreview(MyController myController)
        {
            InitializeComponent();
            _mycontroller = myController;
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ReportDocument report = new ReportDocument();
            report.Load("../../RP/PLNRReport.rpt");
            report.SetDataSource(_mycontroller.FMask);
            CrystalViewer.ViewerCore.ReportSource = report;
        }     
      
    }
}
